This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Apr 13, 2012, 7:10 PM
68 Posts

how to copy an rich text field from one xpage to another?

  • Category: Server Side JavaScript
  • Platform: Windows
  • Release: 8.5.2
  • Role: Developer
  • Tags:
  • Replies: 2
I have an xPage with a button that creates a response document.  I'm using sessionScope variables to copy the values of text fields on the parent document, but also need a way to copy a rich text field from parent to response.  I know how to do this in lotusScript, but not javascript on an xPage.  I'm sure a stream is required, but I cannot find the code for this.
 
Has anyone done this, or have code to do it?  Thanks! 
Apr 14, 2012, 8:21 AM
17 Posts
Re: how to copy an rich text field from one xpage to another?
Hi Ann,
there are exactly the same methods available in JavaScript, so it should be possible to rewrite it quite simply.
Or are there any specific reasons why it is not the option? CD vs. MIME format differences?
 
Update:
I see, you are probably searching for this one:
 
Notes Designer Help:
This button sets the value of a rich text control (bound to requestScope.body) with the value of a rich text item (body) in the current document.
var doc:NotesDocument = currentDocument.getDocument();
if (doc.hasItem("body")) {
	var entity:NotesMIMEEntity = doc.getMIMEEntity("body");
	if (entity != null) {
		requestScope.body = entity.getContentAsText();
	}
}
HTH
 
Apr 27, 2012, 7:17 PM
68 Posts
thanks, but that's not enough information
The code you sent was not sufficient, there must be some missing pieces.

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal